﻿using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using ToyStore.Domain.Store;

namespace ToyStore.Domain.System
{
	/// <summary>
	/// Klasa reprezentująca kontrahenta w systemie.
	/// </summary>
	[DisplayName("Kontrahent")]
	public class Contractor : BaseEntity
	{
		/// <summary>
		/// Konstruktor.
		/// </summary>
		public Contractor()
		{
			Products = new List<Product>();
			Users = new List<User>();
		}

		/// <summary>
		/// Lista produktów danego kontrahenta.
		/// </summary>
		[DisplayName("Produkty")]
		public virtual IList<Product> Products { get; set; }

		/// <summary>
		/// Lista użytkowników kontrahenta.
		/// </summary>
		[DisplayName("Pracownicy")]
		public virtual IList<User> Users { get; set; }

		/// <summary>
		/// Nazwa kontrahenta.
		/// </summary>
		[DisplayName("Nazwa"), StringLength(200)]
		public virtual string Name { get; set; }

		/// <summary>
		/// Miasto.
		/// </summary>
		[DisplayName("Miasto"), StringLength(100)]
		public virtual string City { get; set; }

		/// <summary>
		/// Ulica.
		/// </summary>
		[DisplayName("Ulica"), StringLength(100)]
		public virtual string Street { get; set; }

		/// <summary>
		/// Kod pocztowy.
		/// </summary>
		[DisplayName("Kod pocztowy"), StringLength(10)]
		public virtual string ZipCode { get; set; }
	}
}
